﻿Public Class frmConsumodelDia 

    Private Sub frmConsumodelDia_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DbFireAndIceDataSet.detalleconsumodiariosubsidio' table. You can move, or remove it, as needed.
        Me.DetalleconsumodiariosubsidioTableAdapter.Fill(Me.DbFireAndIceDataSet.detalleconsumodiariosubsidio)
        'TODO: This line of code loads data into the 'DbFireAndIceDataSet.DetalleConsumoDiarioSubsidio' table. You can move, or remove it, as needed.
        Me.DetalleConsumoDiarioSubsidioTableAdapter.Fill(Me.DbFireAndIceDataSet.DetalleConsumoDiarioSubsidio)

        Dim fecha As Date = My.Forms.frmFactura.FechaDateTimePicker.Text
        Dim cliente As String = My.Forms.frmFactura.IdclienteTextEdit.EditValue
        Dim empresa As String = My.Forms.frmFactura.IdempresaTextEdit.Text
        tid.Text = cliente
        tnombre.Text = My.Forms.frmFactura.IdclienteTextEdit.GetColumnValue("cliente")
        FechaDateTimePicker.Text = fecha
        tEmpresa.Text = empresa

        'Try
        '    Me.FacturasTableAdapter.FillByFechaCliente(DbFireAndIceDataSet.facturas, fecha, cliente, 2)
        'Catch ex As Exception
        '    MsgBox(ex.Message)
        'End Try

        Try
            Me.DetalleconsumodiariosubsidioTableAdapter.FillByConsumoDelDia(DbFireAndIceDataSet.detalleconsumodiariosubsidio, cliente, fecha, 2)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End Sub

End Class